import { ICoreApp } from './app'
import { ICoreGroup } from './group'

export interface ICoreHash {
    id: number
    group_id: ICoreGroup['id']
    name: string
    hash: string
    action: string
    method: 'GET' | 'POST'
    sort: number
    remark: string
    state: 0 | 1
    visits: number
    need_system: 0 | 1
    need_login: 0 | 1
    need_log: 0 | 1
}

export type ICoreHashEditParameter = Omit<ICoreHash, 'id' | 'visits'> & {
    id?: ICoreHash['id']
}

export type ICoreHashDeleteParameter = {
    id: ICoreHash['id']
}

export type ICoreHashListParameter = {
    app_id?: ICoreApp['id']
    group_id?: ICoreGroup['id']
}
